import { get } from "./request";
import {ApiResponse} from "@/type.ts";

const getSoftware =async (softwareName:string):Promise<ApiResponse> => {

    return await get(`/software/query/softwareList`,{
        method: "GET",
        params:{
            softwareName:softwareName,
        },
        data:null
    })
}

const getSoftwareQueryList =async (softwareName:string):Promise<ApiResponse> => {

    return await get(`/software/query/list`,{
        method: "GET",
        params:{
            aliasName:softwareName,
        },
        data:null
    })
}

const getSoftwareVersion =async (softwareId:string):Promise<ApiResponse> => {

    return await get(`/software/query/versionList`,{
        method: "GET",
        params:{
            softwareId:softwareId,
        },
        data:null
    })
}

const getSoftwareLink =async (params):Promise<ApiResponse> => {

    return await get(`/software/query/linkList`,{
        method: "GET",
        params,
        data:null
    })
}

export {getSoftware,getSoftwareVersion,getSoftwareLink,getSoftwareQueryList}
